<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:vti="http://java.sun.com/jsf/composite/components/vti">
    <h:form id="formPesquisaGanhador" prependId="false">
        <vti:dataTable id="tableGanhador" styleClass="tableList"
                        value="#{ganhadorBean.listaEntidade}">
            <p:column sortBy="#{item.lanceFk.leilaoFk.produtoFk.nome}"
                      headerText="#{msgs['campo.produto']}">
                <h:outputText value="#{item.lanceFk.leilaoFk.produtoFk.nome}" />
            </p:column>
            <p:column sortBy="#{item.lanceFk.usuarioFk.nome}"
                      headerText="#{msgs['campo.nome']}">
                <h:outputText value="#{item.lanceFk.usuarioFk.nome}" />
            </p:column>
            <p:column sortBy="#{item.lanceFk.usuarioFk.email}"
                      headerText="#{msgs['campo.email']}">
                <h:outputText value="#{item.lanceFk.usuarioFk.email}" />
            </p:column>
            <p:column styleClass="columnNormalCenter"
                      headerText="#{msgs['campo.qtdTotal']}">
                <h:outputText value="#{item.qtdProduto}" />
            </p:column>
            <p:column styleClass="columnNormalCenter"
                      sortBy="#{item.lanceFk.vlrLance}"
                      headerText="#{msgs['campo.lance']}">
                <h:outputText value="#{item.lanceFk.vlrLance}" converter="textConverter">
                    <f:attribute name="type" value="moeda" />
                </h:outputText>
            </p:column>
            <p:column styleClass="columnNormalCenter"
                      headerText="#{msgs['campo.total']}">
                <h:outputText value="#{item.qtdProduto * item.lanceFk.vlrLance}" converter="textConverter">
                    <f:attribute name="type" value="moeda" />
                </h:outputText>
            </p:column>
            <p:column styleClass="columnNormalCenter"
                      sortBy="#{item.lanceFk.horaLance}"
                      headerText="#{msgs['campo.dtLance']}">
                <h:outputText value="#{item.lanceFk.horaLance}">
                    <f:convertDateTime pattern="dd/MM/yyyy HH:mm"/>
                </h:outputText>
            </p:column>
        </vti:dataTable>
    </h:form>
</ui:composition>